package com.gtc.zsk.model.vo;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gtc.zsk.model.entity.QuestionBank;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.Date;


@Data
public class BankMallBankVO implements Serializable {

    /**
     * 题库id
     */
    private Long id;

    /**
     * 标题
     */
    private String title;

    /**
     * 描述
     */
    private String description;

    /**
     * 图片
     */
    private String picture;

    /**
     * 题库开通金额
     */
    private Float money;

    /**
     * 当前登录用户是否已经开通该题库
     */
    private boolean hasOpened;


    public static BankMallBankVO objToVo(QuestionBank questionBank) {
        if (questionBank == null) {
            return null;
        }
        BankMallBankVO bankMallBankVO = new BankMallBankVO();
        BeanUtils.copyProperties(questionBank, bankMallBankVO);
        return bankMallBankVO;
    }
}
